package com.ivi.car.module.home.view.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.ivi.car.R;
import com.ivi.car.bean.home.HomeAdvBean;

import java.util.List;

/**
 * Copyright
 * author zhengcheng
 * date 2018/3/7
 * describe
 * history
 */

public class HomeAdvAdapter extends BaseQuickAdapter<HomeAdvBean, BaseViewHolder> {

  public HomeAdvAdapter(int layoutResId, @Nullable List<HomeAdvBean> data) {
    super(layoutResId, data);
  }

  @Override
  protected void convert(BaseViewHolder helper, HomeAdvBean item) {
    helper.setText(R.id.home_adv_title_tv, item.getTitle())
        .setText(R.id.home_adv_subtitle_tv, item.getSubTitle())
        .setText(R.id.home_price_tv, item.getPrice());
  }
}
